package com.atguigu.ssyx.acl.service;

import com.atguigu.ssyx.model.acl.Role;
import com.atguigu.ssyx.vo.acl.RoleQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.Map;

/**
 * @作者:胡树苑
 * @时间:2025/9/10 20:16
 */
public interface RoleService extends IService<Role> {
    //角色列表(条件分页查询)
    IPage<Role> selectRolePage(Page<Role> pageParam, RoleQueryVo roleQueryVo);
    //返回map集合包含两个角色:所有角色和为用户分配的角色列表
    Map<String, Object> getRoleByAdminId(Long adminId);
    //为用户分配角色
    void saveAdminRole(Long adminId, Long[] roleIds);
    //为角色分配权限
    void savePermissionRole(Long roleId, Long[] permissionIds);
}
